home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1985 September / Ahoy_Magazine_85-09_1985_Double_L.d64 / s&e file addr (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  1KB  |  44 lines

  1. 1 poke53280,0:poke53281,3:poke646,0
  2. 2 print"[147]       start & end file address":rem by dave smart
  3. 4 fori=828to904:reada:pokei,a:next
  4. 6 open15,8,15,"i0"
  5. 8 input" file to check ";f$:print
  6. 10 q=24:p=q*256:s=int(p/256)
  7. 12 poke251,p-s*256:poke252,s
  8. 14 print" ";f$
  9. 16 open1,8,2,"0:"+f$
  10. 18 get#1,a$,b$
  11. 20 d=asc(a$+chr$(0))+256*asc(b$+chr$(0))
  12. 22 input#15,e,e$,e1,e2
  13. 24 ife>0thenprint:print,e$:close1:close15:end
  14. 30 printtab(15)"start addr.(dec)"d
  15. 32 w=d: gosub54
  16. 34 printtab(26)"(hex) "h$
  17. 36 print"please wait..."
  18. 38 sys831
  19. 40 f=p:p=peek(251)+peek(252)*256:t=p
  20. 42 z$=right$("   "+str$(t-f),5)
  21. 44 print"[145]                  "z$;" bytes of mem."
  22. 46 z=val(z$)
  23. 48 printtab(17)"end addr.(dec)"z+w:d=w+z:gosub54
  24. 50 printtab(26)"(hex) "h$
  25. 52 goto60
  26. 54 h$="":m=4096:n=3:ifd<256thenm=16:n=1
  27. 56 forh=0ton:c=int(d/m):d=d-c*m:m=m/16:c=c+48:ifc>57thenc=c+7
  28. 58 h$=h$+chr$(c):next:return
  29. 60 close1:close15
  30. 62 print"do you wish to check another file (y/n)"
  31. 64 geta$:ifa$=""then64
  32. 66 ifa$<>"y"thenend
  33. 68 ifa$="y"then6
  34. 70 data 76,96,3,162,1,32,198,255,32
  35. 72 data 228,255,160,0,145,251,230
  36. 74 data 251,208,8,230,252,165,252
  37. 76 data 201,208,240,6,165,144,41,64
  38. 78 data 240,231,76,204,255,162,1,32
  39. 80 data 201,255,162,54,134,1,160,0
  40. 82 data 177,251,32,210,255,230,251
  41. 84 data 208,2,230,252,165,251,197,253
  42. 86 data 208,239,165,252,197,254,208
  43. 88 data 233,162,55,134,1,76,204,255
  44.